package day0220;

public class Demo03 {


    public static void main(String[] args) {
        Animal animal = null;

//        if (animal instanceof Cat) {
//            Cat cat = (Cat) animal;
//            cat.catchMouse();
//        }

        if (animal instanceof Cat cat) {
            cat.catchMouse();
        }
    }
}
